In some queuing systems, multiple input queues or an aggregated input queue with multiple virtual queues feeds multiple output queues. For example, in a network environment, network switches, routers, and various other network devices may include one or more aggregated input queues that serve a number of output queues. The aggregated queues on the input side may be divided into virtual queues that correspond to the output queues. When a packet arrives at the input side of the device, the packet may be classified to one of the virtual queues and stored in the aggregated queue. Information may be stored along with the packet that identifies the virtual queue to which it belongs. A scheduler schedules packets from the head of the aggregated queue, and the packets are forwarded the appropriate output queues.
In order to control flow between the input and output queues, backpressure messages may be sent from the output queues to the scheduler in response to congestion at one or more of the output queues. For example, a backpressure message may be sent from output queue O1 to the scheduler. Output queue O1 may correspond to virtual queue V1 at the sender. Because the scheduler only schedules packets from the head of the aggregated queue without regard to the virtual queues within the aggregated queue, the congestion at output queue O1 may prevent scheduling of packets not only from virtual queue V1, but also from other virtual queues that are not associated with the congested output queue. Some of these virtual queues at the sender may correspond to output queues that are not congested. Accordingly, because congestion from one output queue may affect scheduling of virtual queues whose output queues are not congested, this conventional use of backpressure messages to control scheduling between input and output queues is inefficient.
One potential solution to this problem is to maintain equal numbers of input and output queues and to separately schedule each output queue. However, there may be hundreds or even thousands of input queues. As a result, hundreds or thousands of individual schedulers would be required, resulting in an overly complex queuing system design.
Another problem associated with allowing a packet to be placed in an aggregated queue on the input side when the packet cannot be scheduled due to congestion at the output queue for that packet is that enqueue bandwidth on the input side is wasted.
Accordingly, in light of these difficulties associated with conventional queuing systems, there exists a need for improved methods, systems, and computer program products for controlling the enqueuing of packets in virtual queues using backpressure messages from output queues corresponding to the virtual queues.